#pragma once
#include "ogreframelistener.h"
#include"BaseApplication.h"
class mFrameListener :
	public Ogre::FrameListener
{
public:
	mFrameListener(void);
	mFrameListener(Ogre::SceneNode* node,Ogre::Entity* ent,Ogre::RenderWindow* win,Ogre::Camera* cam);
	~mFrameListener(void);

	bool frameStarted(const Ogre::FrameEvent& evt);

private:
	Ogre::SceneNode* _node;
	Ogre::FrameListener* FrameListener;
	Ogre::Camera* _Cam;
	Ogre::PolygonMode _PolyMode;
	Ogre::Timer _timer;

	OIS::InputManager* mInputManager;
	OIS::Keyboard* mKeyboard;	
	OIS::Mouse* _mouse;

	Ogre::Entity* _ent;
    Ogre::AnimationState* _aniState;//store the animationState "RunBase"
	Ogre::AnimationState* _aniStateTop;//store the AnimationState "RunTop"
	Ogre::AnimationState* _antiDrawSwords;

	//about animation
	float _WalkingSpeed;
    float _rotation;
};

